import React, { useState, useEffect } from 'react'
import { useNavigate } from "react-router-dom"
import "../Hcy_scss/Hcy_page10.scss"
import { Toast, NavBar } from 'react-vant';
import { useDispatch } from 'react-redux'
import { changeDefaultState,changeDefauprice } from "../../../redux/slice/DefaultSlice"

export default function Hcy_page10() {
    const navigate = useNavigate()
    const dispatch = useDispatch()
    return (
        <div id='Hcy_page10' className='animate__animated animate__bounceInRight'>
            <div className='top'>
                <NavBar
                    title="优惠卷"
                    onClickLeft={() => { navigate("/app") }}
                />
            </div>
            <div className='cenbox'>
                <p><span>现金券 </span>新手注册优惠10元无门槛券</p>
                <p className='rig'><span>10 </span>元</p>
                <p className='txt1'>有效期:2024-10-14至2025-10-14</p>
                <hr />
                <p className='btxt'>仅可打车使用</p>
                <button onClick={()=>{navigate("/app"),dispatch(changeDefauprice(10))}}>立即使用</button>
            </div>
            <div className='cenbox'>
                <p><span>现金券 </span>新手注册优惠5元无门槛券</p>
                <p className='rig'><span>5 </span>元</p>
                <p className='txt1'>有效期:2024-10-14至2025-10-14</p>
                <hr />
                <p className='btxt'>仅可打车使用</p>
                <button onClick={()=>{navigate("/app"),dispatch(changeDefauprice(5))}}>立即使用</button>
            </div>
            <div className='cenbox'>
                <p><span>现金券 </span>新手注册优惠5元豪华车券</p>
                <p className='rig'><span>5 </span>元</p>
                <p className='txt1'>有效期:2024-10-14至2025-10-14</p>
                <hr />
                <p className='btxt'>仅限豪华型车辆使用</p>
                <button className='newbtn'>不适用</button>
            </div>
        </div>
    )
}
